<!DOCTYPE html>
<html>
<head>
    
    <include file="Common/head"/>
    
    <link href="__CSS__/plugins/iCheck/custom.css" rel="stylesheet">
    <script src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <script src="__STATIC__/uploadifive/jquery.uploadifive.min.js"></script>

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>{$title}</h5>
        </div>
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">
                    <include file="Common/alert"/>
                    <div class="clearfix" style="width:100%;">
                        <div class="bars pull-left">
                            <div class="btn-group hidden-xs" id="exampleTableEventsToolbar" role="group">
                                <button type="button" class="btn btn-outline btn-default" href="{:U('Article/index',['category_id'=>I('get.category_id'), 'pid'=>I('get.pid',$info['pid'])])}" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-chevron-left" aria-hidden="true"></i>
                                </button>
                                <button type="button" class="btn btn-outline btn-default" href="{:U('Article/add',['category_id'=>I('get.category_id')])}" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-plus" aria-hidden="true"></i>
                                </button>
                                <button class="btn btn-default btn-outline" type="button" name="refresh" title="刷新" href="__SELF__" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-repeat"></i>
                                </button>
                                <button type="button" class="btn btn-outline btn-default confirm" href="{:U('Config/delete',['id'=>$info['id']])}" style="padding-bottom: 8px;padding-top: 8px;">
                                    <i class="glyphicon glyphicon-trash" aria-hidden="true"></i>
                                </button>
                            </div>
                        </div>
                    </div>
    
                    <form method="post" action="{:U('Article/update')}" class="form-horizontal">
    
                        <volist name=":parse_config_attr($model['field_group'])" id="group">
                            <volist name="fields[$key]" id="field">
                                <if condition="$field['is_show'] == 1 || $field['is_show'] == 3">
                                    <div class="hr-line-dashed"></div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">{$field['title']}</label>
                                        <div class="col-sm-10">
                                            <switch name="field.type">
                                                <case value="num">
                                                    <input name="{$field.name}" type="number" class="form-control" value="{$info[$field['name']]|default=''}" style="width: 30%;">
                                                </case>
                                                <case value="number">
                                                    <input name="{$field.name}" type="number" class="form-control" value="{$info[$field['name']]|default=''}" style="width: 30%;">
                                                </case>
                                                <case value="string">
                                                    <input name="{$field.name}" type="text" class="form-control" value="{$info[$field['name']]|default=''}">
                                                </case>
                                                <case value="textarea">
                                                    <textarea name="{$field.name}" class="form-control" rows="4">{$info[$field['name']]|default=''}</textarea>
                                                </case>
                                                <case value="date">
                                                    <input type="text" name="{$field.name}" class="text date" value="{$info[$field['name']]|date='Y-m-d',###}" placeholder="请选择日期" />
                                                </case>
                                                <case value="datetime">
                                                    <input type="datetime-local" name="datetime-{$field.name}" class="text time" value="{$info[$field['name']]|time_format}" />
                                                    <input type="hidden" name="{$field.name}" value="{$info[$field['name']]}"/>
                                                    <script>
                                                        $(function(){
                                                            $("input[name='datetime-{$field.name}']").on('change', function(){
                                                                console.log($(this).val());
                                                                var local = $(this).val();// 2017-05-02T08:33
                                                                console.log(local.substring(0,4));
                                                                console.log(local.substring(5,7)-1);
                                                                var date = new Date();
                                                                date.setFullYear(local.substring(0,4));
                                                                date.setMonth(local.substring(5,7)-1);
                                                                date.setDate(local.substring(8,10));
                                                                date.setHours(local.substring(11,13));
                                                                date.setMinutes(local.substring(14,16));
                                                                var str = Date.parse(date)/1000;
                                                                console.log(str);
                                                                $("input[name='{$field.name}']").val(str);
                                                            });
                                                        });
                                                    </script>
                                                </case>
                                                <case value="bool">
                                                    <select name="{$field.name}">
                                                        <volist name=":parse_field_attr($field['extra'])" id="vo">
                                                            <option value="{$key}" <eq name="info[$field['name']]" value="$key">selected</eq>>{$vo}</option>
                                                        </volist>
                                                    </select>
                                                </case>
                                                <case value="select">
                                                    <select name="{$field.name}">
                                                        <volist name=":parse_field_attr($field['extra'])" id="vo">
                                                            <option value="{$key}" <eq name="info[$field['name']]" value="$key">selected</eq>>{$vo}</option>
                                                        </volist>
                                                    </select>
                                                </case>
                                                <case value="radio">
                                                    <volist name=":parse_field_attr($field['extra'])" id="vo">
                                                        <label class="radio" style="padding-left: 20px; cursor: pointer;">
                                                            <input type="radio" value="{$key}" name="{$field.name}" <eq name="info[$field['name']]" value="$key">checked="checked"</eq> style="margin-top: 2px;">{$vo}
                                                        </label>
                                                    </volist>
                                                </case>
                                                <case value="checkbox">
                                                    <volist name=":parse_field_attr($field['extra'])" id="vo">
                                                        <label class="checkbox-inline">
                                                            <input type="checkbox" value="{$key}" name="{$field.name}[]" <if condition="check_document_position($info[$field['name']],$key)">checked="checked"</if> style="margin-top:0;">{$vo}
                                                        </label>
                                                    </volist>
                                                </case>
                                                <case value="editor">
                                                    <switch name="ADMIN_EDITOR">
                                                        <case value="ueditor">
                                                            <script id="{$field.name}" name="{$field.name}" type="text/plain" style="width:100%;height:240px;">{$info[$field['name']]}</script>
                                                            <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/ueditor.config.js"></script>
                                                            <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/ueditor.all.min.js"> </script>
                                                            <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
                                                            <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
                                                            <script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
                                                            
                                                            <script type="text/javascript">
                                                                //实例化编辑器
                                                                //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
                                                                var ue_{$field.name} = UE.getEditor('{$field.name}');
                                                            </script>
                                                            
                                                        </case>
                                                        <case value="umeditor">
                                                            <textarea id="{$field.name}" name="{$field.name}" style="width:100%;height:240px;">{$info[$field['name']]}</textarea>
                                                            <!--:hook('adminArticleEdit', array('name'=>$field['name'],'value'=>$data[$field['name']]))}-->
                                                            <link href="__STATIC__/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
                                                            <script type="text/javascript" src="__STATIC__/umeditor/third-party/template.min.js"></script>
                                                            <!-- 配置文件 -->
                                                            <script type="text/javascript" src="__STATIC__/umeditor/umeditor.config.js"></script>
                                                            <!-- 编辑器源码文件 -->
                                                            <script type="text/javascript" src="__STATIC__/umeditor/umeditor.min.js"></script>
                                                            <!--<script type="text/javascript" src="__STATIC__/umeditor/lang/zh-cn/zh-cn.js"></script>-->
                                                            <!-- 实例化编辑器 -->
                                                            <script type="text/javascript">
                                                                //实例化编辑器
                                                                var um_{$field.name} = UM.getEditor('{$field.name}',{
                                                                    imageUrl:"{:U('File/editor')}",
                                                                    imagePath:""
                                                                });
                                                            </script>
                                                        </case>
                                                        <default/>
                                                            <textarea id="{$field.name}" name="{$field.name}" style="width:100%;height:240px;">{$info[$field['name']]}</textarea>
                                                            <!--:hook('adminArticleEdit', array('name'=>$field['name'],'value'=>$data[$field['name']]))}-->
                                                            <link href="__STATIC__/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
                                                            <script type="text/javascript" src="__STATIC__/umeditor/third-party/template.min.js"></script>
                                                            <!-- 配置文件 -->
                                                            <script type="text/javascript" src="__STATIC__/umeditor/umeditor.config.js"></script>
                                                            <!-- 编辑器源码文件 -->
                                                            <script type="text/javascript" src="__STATIC__/umeditor/umeditor.min.js"></script>
                                                            <!--<script type="text/javascript" src="__STATIC__/umeditor/lang/zh-cn/zh-cn.js"></script>-->
                                                            <!-- 实例化编辑器 -->
                                                            <script type="text/javascript">
                                                                //实例化编辑器
                                                                var um = UM.getEditor('{$field.name}',{
                                                                    imageUrl:"{:U('File/editor')}",
                                                                    imagePath:""
                                                                });
                                                            </script>
                                                    </switch>
                                                </case>
                                                <case value="picture">
                                                    <div class="controls">
                                                        <input type="file" id="upload_picture_{$field.name}">
                                                        <input type="hidden" name="{$field.name}" id="cover_id_{$field.name}" value="{$info[$field['name']]}"/>
                                                        <div class="upload-img-box">
                                                            <notempty name="info[$field['name']]">
                                                                <div class="upload-pre-item"><img src="{$info[$field['name']]|get_cover='path'}"/></div>
                                                            </notempty>
                                                        </div>
                                                    </div>
                                                    <style>
                                                        .upload-button{
                                                            background: #1ab394;
                                                            color: white;
                                                            text-align: center;
                                                        }
                                                    </style>
                                                    <script type="text/javascript">
                                                        //上传图片
                                                        /* 初始化上传插件 */
                                                        $("#upload_picture_{$field.name}").uploadify({
                                                            'buttonClass'   :"upload-button",
                                                            "height"          : 30,
                                                            "swf"             : "__STATIC__/uploadify/uploadify.swf",
                                                            "fileObjName"     : "download",
                                                            "buttonText"      : "上传图片",
                                                            "uploader"        : "{:U('File/uploadPicture',array('session_id'=>session_id()))}",
                                                            "width"           : 120,
                                                            'removeTimeout'	  : 1,
                                                            'fileTypeExts'	  : '*.jpg; *.png; *.gif;',
                                                            "onUploadSuccess" : uploadPicture{$field.name},
                                                        'onFallback' : function() {
                                                            alert('未检测到兼容版本的Flash.');
                                                        }
                                                        });
                                                        function uploadPicture{$field.name}(file, data){
                                                            var data = $.parseJSON(data);
                                                            var src = '';
                                                            if(data.status){
                                                                $("#cover_id_{$field.name}").val(data.id);
                                                                src = data.url || '__ROOT__' + data.path;
                                                                
                                                                $("#cover_id_{$field.name}").parent().find('.upload-img-box').html(
                                                                    '<div class="upload-pre-item"><img src="' + src + '"/></div>'
                                                                );
                                                            } else {
                                                                updateAlert(data.info);
                                                                setTimeout(function(){
                                                                    $('#top-alert').find('button').click();
                                                                    $(that).removeClass('disabled').prop('disabled',false);
                                                                },1500);
                                                            }
                                                        }
                                                    </script>
                                                </case>
                                                <case value="pictures">
                                                    <style>
                                                        /*uploadifive样式*/
                                                        
                                                        /*上传按钮样式*/
                                                        .up-input_{$field.name}{
                                                            /*display: none;*/
                                                            width: 75px !important;
                                                            height: 75px !important;
                                                            margin-right: 5px;
                                                            margin-bottom: 5px;
                                                            background-image: url(/Home/wechat_1/images/addphoto.png);
                                                            background-size: cover;
                                                            float: left;
                                                            cursor: pointer;
                                                        }
                                                        .up-input_{$field.name} input[type='file']{
                                                            width: 75px !important;
                                                            height: 75px !important;
                                                            cursor: pointer;
                                                        }
                                                        #up-btn{
                                                            display: none;
                                                        }
                                                        .img-container{
                                                            display: flex;
                                                            flex-wrap: wrap;
                                                        }
                                                        .up-img{
                                                            width: 75px;
                                                            height: 75px;
                                                            margin-right:5px;
                                                            margin-bottom:5px;
                                                        }
                                                        .addimg{
                                                            width: 75px !important;
                                                            height: 75px !important;
                                                            margin-right: 5px;
                                                            margin-bottom: 5px;
                                                            background-image: url('__IMG__/addphoto.png');
                                                            background-size: cover;
                                                            float:left;
                                                        }
                                                        .iconimg{
                                                            float: left;
                                                            margin-top: 2px;
                                                            width: 30px;
                                                            display: inline-block;
                                                            vertical-align: middle;
                                                        }
                                                    </style>
                                                    <div class="controls">
                                                        <div class="upload-img-box">
                                                            <!--<notempty name="info[$field['name']]">-->
                                                                <!--<div class="upload-pre-item"><img src="{$info[$field['name']]|get_cover='path'}"/></div>-->
                                                            <!--</notempty>-->
                                                            <div class="img-container img_{$field.name}">
                                                                <div id="file_upload_{$field.name}" ></div>
                                                            </div>
                                                            <div id="queue" style="display: none;"></div>
                                                            <input type="hidden" name="{$field.name}" value="{$info[$field['name']]}"/>
                                                        </div>
                                                    </div>
                                                    <style>
                                                        .upload-button{
                                                            background: #1ab394;
                                                            color: white;
                                                            text-align: center;
                                                        }
                                                    </style>
                                                    <script type="text/javascript">
                                                        var $image_number = 20;//{:C('IMAGES_NUMBER')};
                                                        $callback_{$field.name} = function($file,$res){
                                                            // 声明变量
                                                            var $data = $.parseJSON($res), $container_{$field.name} = $(".img-container.img_{$field.name}"), $img;

                                                            // 判断是否上传成功
                                                            if ( $data.status == 1 && $data.id > 0 ) {

                                                                // 检查图片(它会检查是否添加图片，并更新表单值)
                                                                // 添加表单并上传图片
                                                                check_img_{$field.name}($data.id)
                                                            } else {
                                                                alert('图片上传失败 '+ $data.info);
                                                            }
                                                        };

                                                        // 初始化时间差图片
                                                        check_img_{$field.name}();

                                                        // 删除图片
                                                        $("body").on('click','.up-img.img_{$field.name}',function(){
                                                            if ( confirm('要删除此图片吗？') ) {
                                                                var $this = $(this), $id = $this.data('id');
                                                                check_img_{$field.name}($id,true);
                                                            }
                                                        });

                                                        /**
                                                         * 检查是否已经存在图片id，存在返回1，不存在返回0
                                                         * 若不存在，则增加图片id到表单
                                                         * 此函数内重复语句较多，有待优化
                                                         * @param $id
                                                         * @returns {number}
                                                         */
                                                        function check_img_{$field.name}($id, $delete){
                                                            // 声明变量
                                                            var $i, $res = 0, $container_{$field.name} = $(".img-container.img_{$field.name}"), $img, $imgs = $(".img-container.img_{$field.name}>.up-img") ,
                                                                $input = $("input[name='{$field.name}']"), $ids_string = $input.val(),$ids_array = [], $ids_array_new = [], $ids_string_new, $path;

                                                            // id>0则是对当前图片的处理
                                                            if ( $id > 0 ) {
                                                                // $delete=true：删除， $delete!=true:上传
                                                                if ( true == $delete ) {
                                                                    // 移除元素
                                                                    $img = $("img.up-img[data-id='"+$id+"']");
                                                                    $img.remove();
                                                                    // 移出表单

                                                                    // 去掉首尾空格
                                                                    $ids_string = $.trim($ids_string);

                                                                    // 过滤多余逗号
                                                                    $ids_string = $ids_string.replace(/^,+/,'').replace(/,+$/,'').replace(/,,/g,',');

                                                                    // 获取id数组
                                                                    $ids_array = $ids_string.split(',');

                                                                    // 去除空元素
                                                                    for( $i = 0; $i < ($ids_array.length); $i ++ ){
                                                                        if ( $ids_array[$i] >0 && $ids_array[$i] != $id ){
                                                                            $ids_array_new.push($ids_array[$i]);
                                                                        }
                                                                    }

                                                                    // 数组合并
                                                                    $ids_string_new = $ids_array_new.join(',');

                                                                    // 表单赋值
                                                                    $input.val($ids_string_new);

                                                                } else {
                                                                    // 判断数量
                                                                    if ( !check_img_{$field.name}() ) {
                                                                        return false;
                                                                    }

                                                                    // 1:有相同id的图片；0:无相同id的图片
                                                                    $imgs.each(function($i){
                                                                        if ( parseInt($($imgs[$i]).data('id')) == parseInt($id) ){
                                                                            $res |= 1;
                                                                        }
                                                                    });

                                                                    // 当可以添加此图片时
                                                                    if ( 0 == $res ) {
                                                                        // 去掉首尾空格
                                                                        $ids_string = $.trim($ids_string);

                                                                        // 过滤多余逗号
                                                                        $ids_string = $ids_string.replace(/^,+/,'').replace(/,+$/,'').replace(/,,/g,',');

                                                                        // 获取id数组
                                                                        $ids_array = $ids_string.split(',');

                                                                        // 先不考虑元素重复，直接追加
                                                                        $ids_array.push($id);

                                                                        // 数组字典排序
                                                                        $ids_array.sort();

                                                                        // 相邻去重
                                                                        for( $i = 0; $i < ($ids_array.length); $i ++ ){
                                                                            if ( $ids_array[$i] != $ids_array[$i+1] && $ids_array[$i] != ''){
                                                                                $ids_array_new.push($ids_array[$i]);
                                                                            }
                                                                        }

                                                                        // 数组合并
                                                                        $ids_string_new = $ids_array_new.join(',');

                                                                        // 表单赋值
                                                                        $input.val($ids_string_new);

                                                                        // 添加图片
                                                                        check_img_{$field.name}();
                                                                    }
                                                                    return $res;
                                                                }
                                                            } else {
                                                                // id不大于0则检查图片数量

                                                                // 去掉首尾空格
                                                                $ids_string = $.trim($ids_string);

                                                                // 过滤多余逗号
                                                                $ids_string = $ids_string.replace(/^,+/,'').replace(/,+$/,'').replace(/,,/g,',');

                                                                // 获取id数组
                                                                $ids_array = $ids_string.split(',');

                                                                // 去除空元素
                                                                for( $i = 0; $i < ($ids_array.length); $i ++ ){
                                                                    if ( $ids_array[$i] >0 ){
                                                                        $ids_array_new.push($ids_array[$i]);
                                                                    }
                                                                }
                                                                // 检查是否有图片元素，没有则创建
                                                                for( $i = 0; $i < ($ids_array_new.length); $i ++ ){

                                                                    // 创建图片元素
                                                                    $img = $("img.up-img[data-id='"+$ids_array_new[$i]+"']");

                                                                    if ( $ids_array_new[$i] != $img.data('id') ){
                                                                        // 获取图片路径
                                                                        $path = "index.php?s=/File/getPicture/id/"+$ids_array_new[$i];
                                                                        // 缩略图元素
                                                                        $img = $("<img class='up-img img_{$field.name}'data-id='"+$ids_array_new[$i]+"' src='"+$path+"'/>");

                                                                        // 增加图片
                                                                        $container_{$field.name}.prepend($img);
                                                                    }
                                                                }

                                                                // 检查数量
                                                                if ( $ids_array_new.length >= $image_number ) {
                                                                    alert('图片最多上传'+$image_number+'张,当前已上传'+$ids_array_new.length+'张');
                                                                    return false;
                                                                } else {
                                                                    return true;
                                                                }
                                                            }
                                                        }

                                                        $('#file_upload_{$field.name}').uploadifive({
                                                            'buttonClass'   : 'up-input_{$field.name}',
                                                            'buttonText'       :'',
                                                            'fileType'      :   'image/*',
                                                            'multi'             : true,
                                                            'auto'             : true,
//                'checkScript'      : 'check-exists.php',
                                                            'removeCompleted'  : true,
                                                            'formData'         : {
                                                                'timestamp' : '{:time()}',
                                                                'token'     : '{:md5("unique_salt" . time())}'
                                                            },
                                                            'queueID'          : 'queue',
                                                            'overrideEvents':['onProgress'],
                                                            'uploadScript'     : '{:U("File/uploadPicture",array("session_id"=>session_id()))}',
                                                            'onUploadComplete' : $callback_{$field.name}
                                                        });
    
    
                                                    </script>
                                                </case>
                                                <case value="images">
                                                    <div class="controls">
                                                        <div class="upload-img-box">
                                                            <notempty name="info[$field['name']]">
                                                                <volist name=":get_images($info[$field['name']])" id="img">
                                                                    <div class="upload-pre-item"><img src="http://{:C('DOMAIN')}{$img.path}"/></div>
                                                                </volist>
                                                            </notempty>
                                                        </div>
                                                    </div>
                                                </case>
                                                <case value="file">
                                                    <div class="controls">
                                                        <input type="file" id="upload_file_{$field.name}">
                                                        <input type="hidden" name="{$field.name}" value="{:think_encrypt(json_encode(get_table_field($info[$field['name']],'id','','File')))}"/>
                                                        <div class="upload-img-box">
                                                            <present name="info[$field['name']]">
                                                                <div class="upload-pre-file"><span class="upload_icon_all"></span>{$info[$field['name']]|get_table_field=###,'id','name','File'}</div>
                                                            </present>
                                                        </div>
                                                    </div>
                                                    <script type="text/javascript">
                                                         
                                                        //上传图片
                                                        /* 初始化上传插件 */
                                                        $("#upload_file_{$field.name}").uploadify({
                                                            "height"          : 30,
                                                            "swf"             : "__STATIC__/uploadify/uploadify.swf",
                                                            "fileObjName"     : "download",
                                                            "buttonText"      : "上传附件",
                                                            "uploader"        : "{:U('File/upload',array('session_id'=>session_id()))}",
                                                            "width"           : 120,
                                                            'removeTimeout'	  : 1,
                                                            "onUploadSuccess" : uploadFile{$field.name},
                                                        'onFallback' : function() {
                                                            alert('未检测到兼容版本的Flash.');
                                                        }
                                                        });
                                                        function uploadFile{$field.name}(file, data){
                                                            var data = $.parseJSON(data);
                                                            if(data.status){
                                                                var name = "{$field.name}";
                                                                $("input[name="+name+"]").val(data.data);
                                                                $("input[name="+name+"]").parent().find('.upload-img-box').html(
                                                                    "<div class=\"upload-pre-file\"><span class=\"upload_icon_all\"></span>" + data.info + "</div>"
                                                                );
                                                            } else {
                                                                updateAlert(data.info);
                                                                setTimeout(function(){
                                                                    $('#top-alert').find('button').click();
                                                                    $(that).removeClass('disabled').prop('disabled',false);
                                                                },1500);
                                                            }
                                                        }
                                                    </script>
                                                </case>
                                                <default/>
                                                <input type="text" class="text input-large" name="{$field.name}" value="{$data[$field['name']]}">
                                            </switch>
                                            <notempty name="field['remark']"><span class="help-block m-b-none">{$field['remark']}</span></notempty>
                                        </div>
                                    </div>
                                </if>
                            </volist>
                        </volist>
    
                        <div class="hr-line-dashed"></div>
    
                        <input type="hidden" name="id" value="{$info.id|default=''}"/>
                        <input type="hidden" name="pid" value="{$info.pid|default=''}"/>
                        <input type="hidden" name="model_id" value="{$info.model_id|default=''}"/>
                        <input type="hidden" name="group_id" value="{$info.group_id|default=''}"/>
                        <input type="hidden" name="category_id" value="{$info.category_id|default=''}">
    
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="submit">保存内容</button>
                                <button class="btn btn-white" type="submit" onclick="window.history.go(-1);">取消</button>
                            </div>
                        </div>
        
                    </form>
                </div>
                
            </div>
        </div>
    </div>
    <!-- End Panel Other -->
</div>
<include file="Common/footer"/>
<script src="__JS__/content.min.js?v=1.0.0"></script>
<script src="__JS__/plugins/iCheck/icheck.min.js"></script>
<script src="__JS__/plugins/summernote/summernote.min.js"></script>
<script src="__JS__/plugins/summernote/summernote-zh-CN.js"></script>

<script>
    $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
    $(document).ready(function(){$(".summernote").summernote({lang:"zh-CN"})});var edit=function(){$("#eg").addClass("no-padding");$(".click2edit").summernote({lang:"zh-CN",focus:true})};var save=function(){$("#eg").removeClass("no-padding");var aHTML=$(".click2edit").code();$(".click2edit").destroy()};
</script>
</body>
</html>
